﻿<UserControl x:Class="XERP.Client.WPF.MenuItemMaintenance.Views.MainMaintenanceView"
             xmlns:helper="clr-namespace:XERP.Client.WPF.Helpers;assembly=XERP.Client.WPF"
             xmlns:domain="clr-namespace:XERP.Domain.MenuSecurityDomain.ClientModels;assembly=XERP.Domain.MenuSecurityDomain"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
             d:DesignHeight="600" d:DesignWidth="650"
             IsEnabled="{Binding Path=FormIsEnabled}" Loaded="UserControl_Loaded" 
             PreviewKeyUp="UserControl_PreviewKeyUp">
    <UserControl.Resources>
        <HierarchicalDataTemplate x:Key="MenuTemplate" 
            ItemsSource="{Binding Children, Mode=TwoWay}" DataType="{x:Type domain:NestedMenuItem}">
            <StackPanel Orientation="Vertical">
                <StackPanel Orientation="Horizontal">
                    <Image Source="{Binding Path=DBImageAsImage, Mode=TwoWay}"/>
                    <Image Height="16" Width="16">
                        <Image.Style>
                            <Style>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding Path=IsValid, Mode=TwoWay}" Value="{x:Null}">
                                        <Setter Property="Image.Source" Value="/XERP.Client;component/Resources/valid.png"/>
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding Path=IsValid, Mode=TwoWay}" Value="0">
                                        <Setter Property="Image.Source" Value="/XERP.Client;component/Resources/valid.png"/>
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding Path=IsValid, Mode=TwoWay}" Value="1">
                                        <Setter Property="Image.Source" Value="/XERP.Client;component/Resources/error.ico" />
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding Path=IsValid, Mode=TwoWay}" Value="2">
                                        <Setter Property="Image.Source" Value="/XERP.Client;component/Resources/flag2.png" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Image.Style>
                    </Image>
                    <TextBlock Text="{Binding Path=Name, Mode=TwoWay}" ></TextBlock>
                    <TextBlock Width="5" Text="{Binding Path=IsValid, Mode=TwoWay}" Visibility="Hidden"></TextBlock>
                </StackPanel>
                <TextBlock Style="{StaticResource BaseErrorBlock}" Height="Auto"
                                       Text="{Binding Path = NotValidMessage, Mode=TwoWay}"/>
            </StackPanel>
        </HierarchicalDataTemplate>
    </UserControl.Resources>
    <Grid Style="{StaticResource BaseGrid}">
        <Grid.RowDefinitions>
          <RowDefinition Height="50"></RowDefinition>
          <RowDefinition Height="550*"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="156"></ColumnDefinition>
          <ColumnDefinition Width="422*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <TextBlock Style="{StaticResource BaseHeader}"
            HorizontalAlignment="Left" Grid.Column="1" Text="Menu Item Maintenance Form"
            FontSize="13" Margin="138,10,0,5" >
        </TextBlock>
        <StackPanel Style="{StaticResource BaseStackPanel}"
            Orientation="Vertical"  Width="271"  Height="50" Grid.ColumnSpan="2"
            HorizontalAlignment="Left" VerticalAlignment="Top">
            <Menu Style="{StaticResource BaseMenu}"
                IsMainMenu="True" Grid.ColumnSpan="2" Width="250" Height="20" 
                VerticalAlignment="Top" HorizontalAlignment="Left">
                <MenuItem Style="{StaticResource BaseMenuItem}" Header="_File">
                    <MenuItem Style="{StaticResource BaseMenuItem}" Header="_New">
                        <MenuItem Style="{StaticResource BaseMenuItem}" Name="mnuNewMenuItem" 
                                  Header="_New MenuItem" IsEnabled="{Binding AllowNew}">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <ei:CallMethodAction
                                    TargetObject="{Binding}"
                                    MethodName="NewMenuItemCommand"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </MenuItem>
                    </MenuItem>
                    <MenuItem Style="{StaticResource BaseMenuItem}"  Header="_Save" Name="mnuSave"
                              Click="SaveMenuItem_Click" >
                        
                    </MenuItem>
                    <MenuItem Style="{StaticResource BaseMenuItem}" Header="_Delete" >
                        <MenuItem Style="{StaticResource BaseMenuItem}" Header="_Delete MenuItem" 
                                  IsEnabled="{Binding AllowDelete}">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <ei:CallMethodAction
                                    TargetObject="{Binding}"
                                    MethodName="DeleteMenuItemCommand"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </MenuItem>
                    </MenuItem>
                    <MenuItem Style="{StaticResource BaseMenuItem}" Header="_Exit" 
                              Command="Close"/>
                </MenuItem>
                <MenuItem Style="{StaticResource BaseMenuItem}" Header="_Edit">
                    
                    <MenuItem Style="{StaticResource BaseMenuItem}" Header="_Refresh">
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="Click">
                                <ei:CallMethodAction
                                TargetObject="{Binding}"
                                MethodName="RefreshCommand"/>
                            </i:EventTrigger>
                        </i:Interaction.Triggers>
                    </MenuItem>
                    <MenuItem Style="{StaticResource BaseMenuItem}" Header="_Cut" 
                              Command="Cut"/>
                    <MenuItem Style="{StaticResource BaseMenuItem}" Header="_Copy" 
                              Command="Copy"/>
                    <MenuItem Style="{StaticResource BaseMenuItem}" Header="_Paste" 
                              Command="Paste"/>
                </MenuItem>
                <MenuItem Style="{StaticResource BaseMenuItem}" Header="_Tools"/>
                <MenuItem Style="{StaticResource BaseMenuItem}" Header="_Actions"/>
                <MenuItem Style="{StaticResource BaseMenuItem}" Header="_Help"/>        
            </Menu>
            <Menu  Style="{StaticResource BaseMenu}"
                IsMainMenu="True"  Width="270" Height="30" KeyboardNavigation.IsTabStop="False" 
                VerticalAlignment="Top" HorizontalAlignment="Left" Background="{x:Null}">
            <MenuItem Style="{StaticResource AddNewMenuItem}" Padding="0">
                <MenuItem Header="_New MenuItem" 
                          IsEnabled="{Binding AllowNew}">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <ei:CallMethodAction
                        TargetObject="{Binding}"
                        MethodName="NewMenuItemCommand"/>
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </MenuItem>
            </MenuItem>
            <MenuItem Style="{StaticResource BaseMenuItem}"
                Click="SaveMenuItem_Click" >
                <MenuItem.Header>
                    <Button Style="{StaticResource SaveButton}" Click="SaveMenuItem_Click">
                        
                    </Button>
                </MenuItem.Header>
            </MenuItem>
            <MenuItem Style="{StaticResource DeleteMenuItem}" Padding="0">
                <MenuItem Style="{StaticResource BaseMenuItem}" Header="_Delete MenuItem" 
                          IsEnabled="{Binding AllowDelete}">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <ei:CallMethodAction
                            TargetObject="{Binding}"
                            MethodName="DeleteMenuItemCommand"/>
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </MenuItem>
            </MenuItem>
                <MenuItem Style="{StaticResource BaseMenuItem}">
                    <MenuItem.Header>
                        <Button Style="{StaticResource ClearButton}" IsEnabled="False">
                            
                        </Button>
                    </MenuItem.Header>
            </MenuItem>
            <MenuItem Style="{StaticResource BaseMenuItem}">
                <MenuItem.Header>
                    <Button Style="{StaticResource RefreshButton}" IsEnabled="False">
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="Click">
                                <ei:CallMethodAction
                                TargetObject="{Binding}"
                                MethodName="RefreshCommand"/>
                            </i:EventTrigger>
                        </i:Interaction.Triggers>
                    </Button>
                </MenuItem.Header>
            </MenuItem>
            <MenuItem Style="{StaticResource BaseMenuItem}" >
                <MenuItem.Header>
                    <Button Style="{StaticResource CutButton}" Command="Cut"/>
                </MenuItem.Header>
            </MenuItem>
            <MenuItem Style="{StaticResource BaseMenuItem}">
                <MenuItem.Header>
                    <Button Style="{StaticResource CopyButton}" Command="Copy"/>
                </MenuItem.Header>
            </MenuItem>
            <MenuItem  Style="{StaticResource BaseMenuItem}">
                <MenuItem.Header>
                    <Button Style="{StaticResource PasteButton}" Command="Paste"/>
                </MenuItem.Header>
            </MenuItem>
        </Menu>
        </StackPanel>
        <GridSplitter Style="{StaticResource BaseVerticalGridSplitter}" Grid.Row="1" Grid.Column="0"/>
        <helper:ExtendedTreeView Name="tvMain" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5"
            ItemsSource="{Binding TreeNestedMenuItemList, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" 
            SelectedItem_="{Binding Path=SelectedMenuItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
            SelectedItemChanged="tv_SelectedItemChanged" ItemTemplate="{StaticResource MenuTemplate}">
            <TreeView.Resources>
                <Style TargetType="TreeViewItem">
                    <Setter Property="IsSelected"                     
                            Value="{Binding Path=IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                </Style>
            </TreeView.Resources>
            
        </helper:ExtendedTreeView>
        <TabControl Style="{StaticResource BaseTabControl}" Name="tabctrlMain" Grid.Column="1" Grid.Row="1">
            <TabItem  Style="{StaticResource BaseTabItem}" Name="tabDetail" Header="Detail">
                <Grid Style="{StaticResource BaseGrid}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="20"></RowDefinition>
                        <RowDefinition Height="657*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="171"></ColumnDefinition>
                        <ColumnDefinition Width="246*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <StackPanel Style="{StaticResource BaseStackPanel}" Grid.Row="0" 
                        Grid.ColumnSpan="2" HorizontalAlignment="Stretch" 
                        VerticalAlignment="Stretch" Orientation="Horizontal" ></StackPanel>
                    <StackPanel Style="{StaticResource BaseStackPanel}"
                        HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                        Orientation="Vertical" Grid.Row="1" Grid.Column="0" >
                        <TextBlock Style="{StaticResource BaseTextBlock}"
                            HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8">ID:
                        </TextBlock>
                        <TextBlock Style="{StaticResource BaseTextBlock}"
                            HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8">Name:
                        </TextBlock>
                        <TextBlock Style="{StaticResource BaseTextBlock}"
                            HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8">Description:
                        </TextBlock>
                        <TextBlock Style="{StaticResource BaseTextBlock}"
                            HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8">Type:
                        </TextBlock>
                        <TextBlock Style="{StaticResource BaseTextBlock}"
                            HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8">Code:
                        </TextBlock>
                        <TextBlock Style="{StaticResource BaseTextBlock}"
                            HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8">Active:
                        </TextBlock>
                        <TextBlock Style="{StaticResource BaseTextBlock}"
                            HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8">Menu Icon:
                        </TextBlock>
                        <TextBlock Style="{StaticResource BaseTextBlock}"
                            HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8">Display Order:
                        </TextBlock>
                        <TextBlock Style="{StaticResource BaseTextBlock}"
                            HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8">Executable:
                        </TextBlock>
                        <TextBlock Style="{StaticResource BaseTextBlock}"
                            HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8">Executable Program ID:
                        </TextBlock>
                        <TextBlock Style="{StaticResource BaseTextBlock}"
                            HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8">Hide Menu:
                        </TextBlock>
                        <TextBlock Style="{StaticResource BaseTextBlock}"
                            HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8">Allow All:
                        </TextBlock>
                        <TextBox Style="{StaticResource BaseTextBox}" 
                            Width="0" Height="0"  Name="ghost"  KeyboardNavigation.IsTabStop="False"/>
                    </StackPanel>
                    <StackPanel Style="{StaticResource BaseStackPanel}"
                        Grid.Row="1" Grid.Column="1"
                        HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                        Orientation="Vertical" IsEnabled="{Binding AllowEdit}">
                        <TextBox Style="{StaticResource BaseTextBox}"
                            HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" Width="250"
                            Text="{Binding Path=SelectedMenuItem.MenuItemID, Mode=TwoWay, TargetNullValue=''}"
                            IsEnabled="{Binding AllowEdit}"
                            MaxLength= "{Binding MenuItemMaxFieldValueDictionary[MenuItemID]}" 
                            KeyboardNavigation.TabIndex="10" Background="White" BorderBrush="DimGray"/>
                        <TextBox Style="{StaticResource BaseTextBox}"
                            HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" Width="250"
                            Text="{Binding Path=SelectedMenuItem.Name, Mode=TwoWay, TargetNullValue=''}"
                            IsEnabled="{Binding AllowEdit}"
                            MaxLength= "{Binding MenuItemMaxFieldValueDictionary[Name]}" 
                            KeyboardNavigation.TabIndex="20" Background="White" BorderBrush="DimGray"/>
                        <TextBox Style="{StaticResource BaseTextBox}"
                            HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" Width="250"
                            Text="{Binding Path=SelectedMenuItem.Description, Mode=TwoWay}"
                            MaxLength= "{Binding MenuItemMaxFieldValueDictionary[Description]}" 
                            KeyboardNavigation.TabIndex="30" BorderBrush="DimGray">
                            
                        </TextBox>
                        <ComboBox  Style="{StaticResource BaseComboBox}"
                            HorizontalAlignment="Left" Width="250" Margin="5"
                            ItemsSource="{Binding Path=MenuItemTypeList, Mode=TwoWay}"
                            DisplayMemberPath="Type"
                            SelectedValue="{Binding Path=SelectedMenuItem.MenuItemTypeID, Mode=TwoWay}"
                            SelectedValuePath="MenuItemTypeID" KeyboardNavigation.TabIndex="40" BorderBrush="DimGray">
                            <ComboBox.ContextMenu>
                                <ContextMenu Style="{StaticResource BaseContextMenu}">
                                    <ContextMenu.Items>
                                        <MenuItem Style="{StaticResource BaseMenuItem}" 
                                            Header="Open Type Maintenance" 
                                            Click="OpenTypeMaintenance_Click" />
                                        <MenuItem Style="{StaticResource BaseMenuItem}"
                                            Header="Search Type">
                                            <i:Interaction.Triggers>
                                                <i:EventTrigger EventName="Click">
                                                    <ei:CallMethodAction
                                                        TargetObject="{Binding}"
                                                        MethodName="TypeSearchCommand"/>
                                                </i:EventTrigger>
                                            </i:Interaction.Triggers>
                                        </MenuItem>
                                    </ContextMenu.Items>
                                </ContextMenu>
                            </ComboBox.ContextMenu>
                        </ComboBox>
                        <ComboBox Style="{StaticResource BaseComboBox}" 
                            HorizontalAlignment="Left" Width="250" Margin="5"
                            ItemsSource="{Binding Path=MenuItemCodeList, Mode=TwoWay}"
                            DisplayMemberPath="Code"
                            SelectedValue="{Binding Path=SelectedMenuItem.MenuItemCodeID, Mode=TwoWay}"
                            SelectedValuePath="MenuItemCodeID" KeyboardNavigation.TabIndex="50" BorderBrush="DimGray">
                            <ComboBox.ContextMenu>
                                <ContextMenu Style="{StaticResource BaseContextMenu}">
                                    <ContextMenu.Items>
                                        <MenuItem Style="{StaticResource BaseMenuItem}" 
                                            Header="Open Code Maintenance" 
                                            Click="OpenCodeMaintenance_Click" />
                                        <MenuItem Style="{StaticResource BaseMenuItem}"
                                            Header="Search Code">
                                            <i:Interaction.Triggers>
                                                <i:EventTrigger EventName="Click">
                                                    <ei:CallMethodAction
                                                        TargetObject="{Binding}"
                                                        MethodName="CodeSearchCommand"/>
                                                </i:EventTrigger>
                                            </i:Interaction.Triggers>
                                        </MenuItem>
                                    </ContextMenu.Items>
                                </ContextMenu>
                            </ComboBox.ContextMenu>
                        </ComboBox>
                        <CheckBox Style="{StaticResource BaseCheckBox}" Margin="8" 
                                  IsChecked="{Binding SelectedMenuItem.Active}"
                                  KeyboardNavigation.TabIndex="60">
                        </CheckBox>
                        <ComboBox Style="{StaticResource BaseComboBox}" 
                            HorizontalAlignment="Left" Width="250" Margin="5"
                            ItemsSource="{Binding Path=DBStroredImageList, Mode=TwoWay}"
                            DisplayMemberPath="Description"
                            SelectedValue="{Binding Path=SelectedMenuItem.ImageID, Mode=TwoWay}"
                            SelectedValuePath="ImageID" KeyboardNavigation.TabIndex="70" BorderBrush="DimGray">
                            <ComboBox.ContextMenu>
                                <ContextMenu Style="{StaticResource BaseContextMenu}">
                                    <ContextMenu.Items>
                                        <MenuItem Style="{StaticResource BaseMenuItem}" 
                                            Header="Open Menu Icon Maintenance" 
                                            Click="OpenMenuIconMaintenance_Click" />
                                    </ContextMenu.Items>
                                </ContextMenu>
                            </ComboBox.ContextMenu>
                        </ComboBox>
                        <TextBox Style="{StaticResource BaseTextBox}"
                            HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" Width="250"
                            Text="{Binding Path=SelectedMenuItem.DisplayOrder, Mode=TwoWay}"
                            MaxLength= "20" 
                            KeyboardNavigation.TabIndex="80" BorderBrush="DimGray"/>
                        <CheckBox Style="{StaticResource BaseCheckBox}" Margin="8" 
                                  IsChecked="{Binding SelectedMenuItem.Executable}"
                                  KeyboardNavigation.TabIndex="90">
                        </CheckBox>
                        <ComboBox Style="{StaticResource BaseComboBox}" 
                            HorizontalAlignment="Left" Width="250" Margin="5"
                            ItemsSource="{Binding Path=ExecutableProgramList, Mode=TwoWay}"
                            DisplayMemberPath="Name"
                            SelectedValue="{Binding Path=SelectedMenuItem.ExecutableProgramID, Mode=TwoWay}"
                            SelectedValuePath="ExecutableProgramID" KeyboardNavigation.TabIndex="100" BorderBrush="DimGray" >
                            <ComboBox.ContextMenu>
                                <ContextMenu Style="{StaticResource BaseContextMenu}">
                                    <ContextMenu.Items>
                                        <MenuItem Style="{StaticResource BaseMenuItem}" 
                                            Header="Open Executable Program Maintenance" 
                                            Click="OpenExecutableCodeMaintenance_Click" />
                                    </ContextMenu.Items>
                                </ContextMenu>
                            </ComboBox.ContextMenu>
                        </ComboBox>
                        <CheckBox Style="{StaticResource BaseCheckBox}" Margin="8" 
                                  IsChecked="{Binding SelectedMenuItem.HideMenu}"
                                  KeyboardNavigation.TabIndex="110">
                        </CheckBox>
                        <CheckBox Style="{StaticResource BaseCheckBox}" Margin="8" 
                                  IsChecked="{Binding SelectedMenuItem.AllowAll}"
                                  KeyboardNavigation.TabIndex="120">
                        </CheckBox>
                    </StackPanel>
                </Grid>
            </TabItem>
            <TabItem  Style="{StaticResource BaseTabItem}" Name="tabSecurityRole" Header="Menu Security">
                <Grid Style="{StaticResource BaseGrid}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="20"></RowDefinition>
                        <RowDefinition Height="657*"></RowDefinition>
                        <RowDefinition Height="20"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="250"></ColumnDefinition>
                        <ColumnDefinition Width="50"></ColumnDefinition>
                        <ColumnDefinition Width="200*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" 
                                VerticalAlignment="Center" Text="Available Security Groups" FontWeight="Bold" />
                    <ListBox Grid.Row="1" Grid.Column="0" Name="lbxAvailableSecurityGroups"
                                ItemsSource="{Binding AvailableSecurityGroupList}"
                                SelectionMode="Multiple">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Vertical">
                                    <TextBlock Text="{Binding Path=Name}" >
                                    </TextBlock>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    <TextBlock Grid.Row="0" Grid.Column="2" 
                                VerticalAlignment="Center" Text="Assigned Security Groups" FontWeight="Bold" />
                    <ListBox Grid.Row="1" Grid.Column="2" Name="lbxAssignedSecurityGroups"
                                ItemsSource="{Binding AssignedSecurityGroupList}"
                                SelectionMode="Multiple" FontWeight="Normal">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Vertical">
                                    <TextBlock Text="{Binding Path=Name}" >
                                    </TextBlock>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    
                    
                    <StackPanel Orientation="Vertical"  Grid.Row="1" Grid.Column="1" 
                                VerticalAlignment="Center">
                        <Button FontFamily="Wingdings 3" Content="uu" Name="btnAssignAllSecurityGroups"
                                Margin="5,10,5,10" Height="30" Foreground="#FF003C74" FontWeight="Bold" FontSize="15">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <ei:CallMethodAction
                                    TargetObject="{Binding}"
                                    MethodName="AssignAllSecurityGroupsCommand"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>

                        </Button>
                        <Button FontFamily="Wingdings 3" Content="u" Name="btnAssignSelectedSecurityGroups"
                                Margin="5,10,5,10" Height="30" Foreground="#FF003C74" FontWeight="Bold" FontSize="15" Click="btnAssignSelectedSecurityGroups_Click"></Button>
                        <Button FontFamily="Wingdings 3" Content="t" Name="btnRemoveSelectedSecurityGroups"
                                Margin="5,10,5,10" Height="30" Foreground="#FF003C74" FontWeight="Bold" FontSize="15" Click="btnRemoveSelectedSecurityGroups_Click"></Button>
                        <Button FontFamily="Wingdings 3" Content="tt" Name="btnRemoveAllSecurityGroups"
                                Margin="5,10,5,10" Height="30" Foreground="#FF003C74" FontWeight="Bold" FontSize="15">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <ei:CallMethodAction
                                TargetObject="{Binding}"
                                MethodName="RemoveAllSecurityGroupsCommand"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </Button>
                        
                    </StackPanel>
                </Grid>
            </TabItem>
        </TabControl>
    </Grid>
</UserControl>
